package org.dtrd.modules.suggest.service;

import org.dtrd.modules.suggest.entity.bean.PeriodFoodScore;
import org.dtrd.modules.suggest.entity.po.DtrdEntRdSigninRecordSuggest;
import com.baomidou.mybatisplus.extension.service.IService;

import java.text.ParseException;
import java.util.List;
import org.dtrd.modules.suggest.entity.bean.SigninRecordSuggestDetail;
import org.dtrd.modules.suggest.entity.bean.SigninRecordSuggestListInfo;
import org.dtrd.modules.suggest.entity.bean.SigninRecordSuggestListRequest;
import org.dtrd.modules.suggest.entity.bean.SigninRecordSuggestPageRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * <p>
 * 打卡记录建议表服务类
 * </p>
 *
 * @author sun
 * @since 2022-08-03
 */
public interface IDtrdEntRdSigninRecordSuggestService extends IService<DtrdEntRdSigninRecordSuggest> {

    List<SigninRecordSuggestListInfo> getSigninRecordSuggestList(SigninRecordSuggestListRequest request);

    List<SigninRecordSuggestListInfo> getSigninRecordSuggestListById(Integer recordId);

    IPage<SigninRecordSuggestListInfo> pageSigninRecordSuggest(SigninRecordSuggestPageRequest request);

    SigninRecordSuggestDetail getSigninRecordSuggest(Integer dataId);

    boolean saveOrUpdateSigninRecordSuggest(SigninRecordSuggestDetail dto);

    boolean removeSigninRecordSuggest(Integer dataId);

    /**
     * 获取起始与结束时间饮食打卡的评论列表
     * @param patientId
     * @param startDate
     * @param endDate
     * @return
     */
    List<DtrdEntRdSigninRecordSuggest> getPeriodSigninRecordSuggest(Integer patientId, String startDate, String endDate);

    /**
     * 获取周期内饮食打卡的分数平均
     * @param patientId
     * @param startDate
     * @param endDate
     * @return
     */
    Float getPatientSigninDietRecordScoreAvg(Integer patientId, String startDate, String endDate);

    /**
     * 生成周期内饮食得分曲线
     *
     * @param patientId
     * @param startDate
     * @param endDate
     * @return
     */
    PeriodFoodScore getFoodScoreForCharts(Integer patientId, String startDate, String endDate);

}
